package com.sohoometer;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;

public class URLEncodeDemo {
	public static void main(String[] args) throws UnsupportedEncodingException {
		String string = "1/f noise";
		 String encode = URLEncoder.encode(string);
		 String decode = "1%2Ff+noise";
		 byte[] bytes = new byte[3];
		 bytes[0]= (byte) 0xEF;
		 bytes[1]= (byte) 0xBB;
		 bytes[2]= (byte) 0xBF;
		 String BOM = new String(bytes,"UTF-8");
		 String helloBOM = "helloBOM?";
		 helloBOM+=BOM;
		 System.out.println(helloBOM);
	}

}
